package com.xinke.module.system.model.vo.user;

import com.mzt.logapi.starter.annotation.DiffLogField;
import com.xinke.module.system.component.user.PostParseFunction;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 用户信息新增/修改 Request VO")
@Data
public class AdminUserSaveReqVO {

    @Schema(description = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3244")
    private Long userId;

    @Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    @NotEmpty(message = "用户账号不能为空")
    private String userName;

    @Schema(description = "密码")
    private String userPassword;

    @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
    @NotEmpty(message = "用户昵称不能为空")
    private String userNickName;

    @Schema(description = "部门ID", example = "17468")
    private Long deptId;

    @Schema(description = "岗位编号数组")
    @DiffLogField(name = "岗位", function = PostParseFunction.NAME)
    private Set<Long> postIds;

    @Schema(description = "用户邮箱")
    private String userEmail;

    @Schema(description = "手机号码")
    private String userPhone;

    @Schema(description = "用户性别")
    private Integer userSex;

    @Schema(description = "头像地址")
    private String userAvatar;

    @Schema(description = "帐号状态（1正常 0停用）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
   // @NotNull(message = "帐号状态（1正常 0停用）不能为空")
    private Integer userStatus;

    @Schema(description = "最后登录IP")
    private String loginIp;

    @Schema(description = "最后登录时间")
    private LocalDateTime loginDate;

    @Schema(description = "备注", example = "你说的对")
    private String remark;

}